package com.ruoyi.siyun.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.siyun.mapper.SyAppBlacklistMapper;
import com.ruoyi.siyun.domain.SyAppBlacklist;
import com.ruoyi.siyun.service.ISyAppBlacklistService;

/**
 * 黑名单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-24
 */
@Service
public class SyAppBlacklistServiceImpl implements ISyAppBlacklistService 
{
    @Autowired
    private SyAppBlacklistMapper syAppBlacklistMapper;

    /**
     * 查询黑名单
     * 
     * @param id 黑名单主键
     * @return 黑名单
     */
    @Override
    public SyAppBlacklist selectSyAppBlacklistById(Long id)
    {
        return syAppBlacklistMapper.selectSyAppBlacklistById(id);
    }

    /**
     * 查询黑名单列表
     * 
     * @param syAppBlacklist 黑名单
     * @return 黑名单
     */
    @Override
    public List<SyAppBlacklist> selectSyAppBlacklistList(SyAppBlacklist syAppBlacklist)
    {
        return syAppBlacklistMapper.selectSyAppBlacklistList(syAppBlacklist);
    }

    /**
     * 新增黑名单
     * 
     * @param syAppBlacklist 黑名单
     * @return 结果
     */
    @Override
    public int insertSyAppBlacklist(SyAppBlacklist syAppBlacklist)
    {
        syAppBlacklist.setCreateTime(DateUtils.getNowDate());
        return syAppBlacklistMapper.insertSyAppBlacklist(syAppBlacklist);
    }

    /**
     * 修改黑名单
     * 
     * @param syAppBlacklist 黑名单
     * @return 结果
     */
    @Override
    public int updateSyAppBlacklist(SyAppBlacklist syAppBlacklist)
    {
        syAppBlacklist.setUpdateTime(DateUtils.getNowDate());
        return syAppBlacklistMapper.updateSyAppBlacklist(syAppBlacklist);
    }

    /**
     * 批量删除黑名单
     * 
     * @param ids 需要删除的黑名单主键
     * @return 结果
     */
    @Override
    public int deleteSyAppBlacklistByIds(Long[] ids)
    {
        return syAppBlacklistMapper.deleteSyAppBlacklistByIds(ids);
    }

    /**
     * 删除黑名单信息
     * 
     * @param id 黑名单主键
     * @return 结果
     */
    @Override
    public int deleteSyAppBlacklistById(Long id)
    {
        return syAppBlacklistMapper.deleteSyAppBlacklistById(id);
    }
}
